<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix='c'	uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>로그인 폼</title>
<script type="text/javascript">
function formCheck(){
	var form = window.document.f1;//폼태그 객체
	//if(!form.id.value){
	if(!document.getElementById("id").value){
		alert("아이디를 입력하세요");
		form.id.focus();
		return false;
	}
	if(!form.password.value){
		alert("패스워드를 입력하세요");
		form.password.focus();
		return false;
	}
}
</script>
</head>
<body>
로그인 폼<br>   
<hr width="300" align="left"> 
<c:if test="${requestScope.error_message != null }">
	<font size='2' color='red'>${requestScope.error_message }</font>
</c:if>
<form action="/MemberManagerFC_iBatis_spring_insts/controller" method="post"
		  onsubmit="return formCheck();" name="f1">
<input type="hidden" name="command" value="login" >
	<table>
		<tr>
			<td>아이디</td>
			<td><input type="text" name="id" size="20" maxlength="10" id="id"></td>
		</tr>
		<tr>
			<td>패스워드</td>
			<td><input type="password" name="password" size="20" maxlength="10"></td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" value="로그인">
				<input type="reset" value="초기화">
			</td>
		</tr>
	</table>	
</form>
</body>
</html>